﻿<%@ Page Language="C#" %>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="System.Linq" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Write("winurl=http://up1.highlandsoft.com.vn/win.html&");
        Response.Write("solved=false&");
        Response.Write("solvedmember=" + Request.QueryString["solvedmember"]);
        string letter = Request.QueryString["letter"];
        string solution = Request.QueryString["solution"];
        string code = Request.QueryString["code"];
        string member = Request.QueryString["member"];
        string product_Id = Request.QueryString["advertizer_id"];
        using (Up1VNDataContext dc = new Up1VNDataContext())
        {
            long? UsersLuckCycle_Id=null;
            var user_id = dc.Users.Single(u=>u.Users_Name==member);
            int maDN =int.Parse(Page.RouteData.GetRequiredString("Madoanhnghiep"));
            var LuckCycle_Id = dc.USP_LuckCycle_GetByEStoreId((long)maDN,user_id.Users_Id);
            dc.USP_UsersLuckCycle_Insert(ref UsersLuckCycle_Id, LuckCycle_Id.Single().LuckCycle_Id, (long)user_id.Users_Id, letter, solution, DateTime.Now);
        }
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
    </form>
</body>
</html>
